package com.welfare.business.service.impl;

import java.util.List;
import com.welfare.common.annotation.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.welfare.business.mapper.BookMapper;
import com.welfare.business.domain.Book;
import com.welfare.business.domain.BookExample;
import com.welfare.business.service.BookService;
import com.welfare.common.base.BaseServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * bookService业务层处理
 * 
 * @author welfare
 * @date 2022-09-29
 */
@Service
@BaseService
public class BookServiceImpl extends BaseServiceImpl<BookMapper,Book, BookExample>  implements BookService
{
    private static final Logger log = LoggerFactory.getLogger(BookServiceImpl.class);


    @Autowired
    private BookMapper bookMapper;

    /**
     * 查询book
     *
     * @param bid book主键
     * @return book
     */
    @Override
    public Book selectBookByBid(Integer bid)
    {
        return bookMapper.selectBookByBid(bid);
    }

    /**
     * 查询book列表
     *
     * @param book book
     * @return book
     */
    @Override
    public List<Book> selectBookList(Book book)
    {
        return bookMapper.selectBookList(book);
    }

    /**
     * 新增book
     *
     * @param book book
     * @return 结果
     */
    @Override
    public int insertBook(Book book)
    {
            return bookMapper.insertBook(book);
    }

    /**
     * 修改book
     *
     * @param book book
     * @return 结果
     */
    @Override
    public int updateBook(Book book)
    {
        return bookMapper.updateBook(book);
    }

    /**
     * 批量删除book
     *
     * @param bids 需要删除的book主键
     * @return 结果
     */
    @Override
    public int deleteBookByBids(Integer[] bids)
    {
        return bookMapper.deleteBookByBids(bids);
    }

    /**
     * 删除book信息
     *
     * @param bid book主键
     * @return 结果
     */
    @Override
    public int deleteBookByBid(Integer bid)
    {
        return bookMapper.deleteBookByBid(bid);
    }
}
